package procsim;

class PaintSynchronization extends PaintTab {
    public PaintSynchronization(Paint parent) {
        super(parent);
        // Coordinates
        Design.busHOLD.addCoords(this, Design.SyncAND1.getUpper2Coords(50));
        Design.read.addCoords(this, Design.SyncAND1.getLower2Coords(40));
        Design.SyncAND1out.addCoords(this, Design.SyncAND1.getResCoords(40));
        Design.SyncAND1out.addCoords(this, 110, 84, 110, 55);
        Design.DRD.addCoords(this, Design.SyncD1.getQCoords(30));
        Design.SyncD1Qcompl.addCoords(this, Design.SyncD1.getQComplCoords(50));
        Design.SyncD1Qcompl.addCoords(this, 240, 133, 240, 70);
        Design.SyncAND1out.addCoords(this, Design.SyncAND2.getUpper2Coords(150));
        Design.SyncD1Qcompl.addCoords(this, Design.SyncAND2.getLower2Coords(20));
        Design.rd.addCoords(this, Design.SyncAND2.getResCoords(30).horizontalFlip());
        Design.busHOLD.addCoords(this, Design.SyncAND3.getUpper2Coords(50));
        Design.write.addCoords(this, Design.SyncAND3.getLower2Coords(40));
        Design.SyncAND3out.addCoords(this, Design.SyncAND3.getResCoords(40));
        Design.SyncAND3out.addCoords(this, 110, 214, 110, 185);
        Design.DWR.addCoords(this, Design.SyncD2.getQCoords(30));
        Design.SyncD2Qcompl.addCoords(this, Design.SyncD2.getQComplCoords(50));
        Design.SyncD2Qcompl.addCoords(this, 240, 263, 240, 200);
        Design.SyncAND3out.addCoords(this, Design.SyncAND4.getUpper2Coords(150));
        Design.SyncD2Qcompl.addCoords(this, Design.SyncAND4.getLower2Coords(20));
        Design.wr.addCoords(this, Design.SyncAND4.getResCoords(30).horizontalFlip());
        Design.read.addCoords(this, Design.SyncOR1.getUpper2Coords(40));
        Design.write.addCoords(this, Design.SyncOR1.getLower2Coords(40));
        Design.SyncOR1out.addCoords(this, Design.SyncOR1.getResCoords(43));
        Design.SyncOR1out.addCoords(this, 110, 344, 110, 315);
        Design.SyncD3Qcompl.addCoords(this, Design.SyncD3.getQComplCoords(50));
        Design.SyncD3Qcompl.addCoords(this, 240, 393, 240, 330);
        Design.SyncOR1out.addCoords(this, Design.SyncAND5.getUpper2Coords(150));
        Design.SyncD3Qcompl.addCoords(this, Design.SyncAND5.getLower2Coords(20));
        Design.brqSTART.addCoords(this, Design.SyncAND5.getResCoords(50));
        Design.SyncCNTin.setSpacing(10).addCoords(this, 525, 70, 525, 40);
        Design.brqSTART.addCoords(this, Design.SyncCNT.getLdCoords(50));
        Design.busHOLD.addCoords(this, Design.SyncCNT.getDecCoords(50));
        Design.SyncCNTout2.addCoords(this, 525, 130, 525, 155);
        Design.SyncCNTout2.addCoords(this, 477, 155, 567, 155);
        Design.SyncCNTout2.addCoords(this, Design.SyncOR2.getLower3Coords(45));
        Design.SyncCNTout2.addCoords(this, Design.SyncAND6.getLower3CoordsInv(45));
        Design.SyncCNTout1.addCoords(this, 535, 130, 535, 160);
        Design.SyncCNTout1.addCoords(this, 492, 160, 582, 160);
        Design.SyncCNTout1.addCoords(this, Design.SyncOR2.getMiddle3Coords(40));
        Design.SyncCNTout1.addCoords(this, Design.SyncAND6.getMiddle3CoordsInv(40));
        Design.SyncCNTout0.addCoords(this, 545, 130, 545, 165);
        Design.SyncCNTout0.addCoords(this, 508, 165, 598, 165);
        Design.SyncCNTout0.addCoords(this, Design.SyncOR2.getUpper3Coords(35));
        Design.SyncCNTout0.addCoords(this, Design.SyncAND6.getUpper3Coords(35));
        Design.SyncOR2out.addCoords(this, Design.SyncOR2.getResCoords(23));
        Design.SyncOR2out.addCoords(this, Design.SyncAND7.getLower2Coords(32));
        Design.DRD.addCoords(this, Design.SyncAND7.getUpper2Coords(30));
        Design.stopRD.addCoords(this, Design.SyncAND7.getResCoords(40));
        Design.SyncAND6out.addCoords(this, Design.SyncAND6.getResCoords(25));
        Design.SyncAND6out.addCoords(this, Design.SyncAND8.getUpper2Coords(28));
        Design.DWR.addCoords(this, Design.SyncAND8.getLower2Coords(30));
        Design.stopWR.addCoords(this, Design.SyncAND8.getResCoords(30));
        Design.stopRD.addCoords(this, Design.SyncOR3.getUpper2Coords(40));
        Design.stopWR.addCoords(this, Design.SyncOR3.getLower2Coords(40));
        Design.brqSTOP.addCoords(this, Design.SyncOR3.getResCoords(45));
        Design.read.addCoords(this, Design.SyncOR4.getUpper2Coords(30));
        Design.write.addCoords(this, Design.SyncOR4.getLower2Coords(30));
        Design.SyncOR4out.addCoords(this, Design.SyncOR4.getResCoords(40));
        Design.brqSTOP.addCoords(this, Design.SyncOR5.getUpper2Coords(45));
        Design.run.addCoords(this, Design.SyncOR5.getResCoords(20));

        // Collections
        elements.add(Design.SyncD1);
        elements.add(Design.SyncD2);
        elements.add(Design.SyncD3);
        elements.add(Design.SyncCNT);
        elements.add(Design.SyncInv1);
        elements.add(Design.SyncInv2);
        elements.add(Design.SyncAND1);
        elements.add(Design.SyncAND2);
        elements.add(Design.SyncAND3);
        elements.add(Design.SyncAND4);
        elements.add(Design.SyncAND5);
        elements.add(Design.SyncAND6);
        elements.add(Design.SyncAND7);
        elements.add(Design.SyncAND8);
        elements.add(Design.SyncOR1);
        elements.add(Design.SyncOR2);
        elements.add(Design.SyncOR3);
        elements.add(Design.SyncOR4);
        elements.add(Design.SyncOR5);

        lines.add(Design.SyncCNTin);
        lines.add(Design.busHOLD);
        lines.add(Design.read);
        lines.add(Design.write);
        lines.add(Design.rd);
        lines.add(Design.wr);
        lines.add(Design.stopRD);
        lines.add(Design.DRD);
        lines.add(Design.DWR);
        lines.add(Design.brqSTART);
        lines.add(Design.brqSTOP);
        lines.add(Design.run);
        lines.add(Design.stopWR);
        lines.add(Design.SyncAND1out);
        lines.add(Design.SyncAND3out);
        lines.add(Design.SyncOR1out);
        lines.add(Design.SyncD1Qcompl);
        lines.add(Design.SyncD2Qcompl);
        lines.add(Design.SyncD3Qcompl);
        lines.add(Design.SyncCNTout0);
        lines.add(Design.SyncCNTout1);
        lines.add(Design.SyncCNTout2);
        lines.add(Design.SyncOR2out);
        lines.add(Design.SyncAND6out);
        lines.add(Design.SyncOR4out);
    }
}
